import axios from "axios";

/* async function getTopRatedMovies() {
  return axios({
    method: "get",
    url: "https://apis.netstart.cn/douguo/home/recommended",
    params: {
    }
      // /0/10
  }).then((res)=>{
  })
} */

 function getRecommendList(offset) {
  var limit = 10;
  // var limit = 1;
    return axios.get("https://apis.netstart.cn/douguo/home/recommended/" + offset + '/' + limit);
  }

 function getAttentionList(offset) {
  // var offset = 0;
  var limit = 20;
    return axios.get("https://apis.netstart.cn/douguo/home/ffeeds/" + offset + '/' + limit);
  }
   function getNoteList(offset) {
    // var offset = 0;
    var limit = 20;
    return axios.get("https://apis.netstart.cn/douguo/home/notes/" + offset + '/' + limit);
  }
   function getVideoList(offset) {
    // var offset = 0;
    var limit = 10;
    return axios.get("https://apis.netstart.cn/douguo/home/videos/" + offset + '/' + limit);
  }
   function getMenuNav() {
    return axios.get("https://apis.netstart.cn/douguo/recipe/flatcatalogs");
  }
  function getHotWord() {
    return axios.get("https://apis.netstart.cn/douguo/recipe/search/hot");
  }
  function getFoodDetail(id) {
    return axios.get("https://apis.netstart.cn/douguo/recipe/detail/"+id);
  }
  function getNoteDetail(id) {
    return axios.get("https://apis.netstart.cn/douguo/note/detail/"+id);
  }
  function getRelateNote(id,offset) {
    var limit = 20;
    return axios.get("https://apis.netstart.cn/douguo/note/related/"+ id +'/'+ offset +'/'+limit);
  }
  
  function getSearchDetail(word) {
    return axios.get("https://apis.netstart.cn/douguo/recipe/search/suggests?kw="+word);
  }
  function getComment(id,offset) {
    return axios.get("https://apis.netstart.cn/douguo/recipe/flatcomments/"+id+'/'+ offset +"/20");
  }
  
export { getRecommendList,getAttentionList,getNoteList,getVideoList,getMenuNav,getHotWord,getFoodDetail,getNoteDetail,getSearchDetail,getRelateNote,getComment };
